#ifndef MERGESORT_H
#define MERGESORT_H
#include "ialgo.h"

class MergeSort: public IAlgo
{
public:
    MergeSort(QObject *parent);

    // IAlgo interface
public:
    virtual QString name() override;
    virtual void run() override;

private:
    void sort(QVector<int> & data, int left, int right);

    void merge(QVector<int> & data, int left, int mid, int right);
};

#endif // MERGESORT_H
